<?php
header("Content-type:text/html;charset=utf-8");

function delDir($dir)
{
	foreach(glob($dir.'/*') as $d)
	{
		is_dir($d)?delDir($d):unlink($d);
	}
	rmdir($dir);
}

delDir($_GET['dir']);
echo "删除成功";
		echo "<script>setTimeout(function(){
			location.href='index.php';
		},2000);</script>";